3.2439 \(\int (\frac{1}{x}-\frac{1}{x \sqrt{1+b x+c x^2}}) \, dx\)

Optimal. Leaf size=23 \[ \log \left (-2 \sqrt{b x+c x^2+1}-b x-2\right ) \]

[Out]

Log[-2 - b*x - 2*Sqrt[1 + b*x + c*x^2]]

________________________________________________________________________________________

Rubi [A]  time = 0.0146442, antiderivative size = 27, normalized size of antiderivative = 1.17, number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.087, Rules used = {724, 206} \[ \tanh ^{-1}\left (\frac{b x+2}{2 \sqrt{b x+c x^2+1}}\right )+\log (x) \]

Antiderivative was successfully verified.

[In]

Int[x^(-1) - 1/(x*Sqrt[1 + b*x + c*x^2]),x]

[Out]

ArcTanh[(2 + b*x)/(2*Sqrt[1 + b*x + c*x^2])] + Log[x]

Rule 724

Int[1/(((d_.) + (e_.)*(x_))*Sqrt[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]), x_Symbol] :> Dist[-2, Subst[Int[1/(4*c*d
^2 - 4*b*d*e + 4*a*e^2 - x^2), x], x, (2*a*e - b*d - (2*c*d - b*e)*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a,
b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[2*c*d - b*e, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \left (\frac{1}{x}-\frac{1}{x \sqrt{1+b x+c x^2}}\right ) \, dx &=\log (x)-\int \frac{1}{x \sqrt{1+b x+c x^2}} \, dx\\ &=\log (x)+2 \operatorname{Subst}\left (\int \frac{1}{4-x^2} \, dx,x,\frac{2+b x}{\sqrt{1+b x+c x^2}}\right )\\ &=\tanh ^{-1}\left (\frac{2+b x}{2 \sqrt{1+b x+c x^2}}\right )+\log (x)\\ \end{align*}

Mathematica [A]  time = 0.0549276, size = 27, normalized size = 1.17 \[ \tanh ^{-1}\left (\frac{b x+2}{2 \sqrt{b x+c x^2+1}}\right )+\log (x) \]

Antiderivative was successfully verified.

[In]

Integrate[x^(-1) - 1/(x*Sqrt[1 + b*x + c*x^2]),x]

[Out]

ArcTanh[(2 + b*x)/(2*Sqrt[1 + b*x + c*x^2])] + Log[x]

________________________________________________________________________________________

Maple [A]  time = 0.041, size = 24, normalized size = 1. \begin{align*}{\it Artanh} \left ({\frac{bx+2}{2}{\frac{1}{\sqrt{c{x}^{2}+bx+1}}}} \right ) +\ln \left ( x \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/x-1/x/(c*x^2+b*x+1)^(1/2),x)

[Out]

arctanh(1/2*(b*x+2)/(c*x^2+b*x+1)^(1/2))+ln(x)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/x-1/x/(c*x^2+b*x+1)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.07543, size = 73, normalized size = 3.17 \begin{align*} \log \left (x\right ) - \log \left (-\frac{b x - 2 \, \sqrt{c x^{2} + b x + 1} + 2}{x}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/x-1/x/(c*x^2+b*x+1)^(1/2),x, algorithm="fricas")

[Out]

log(x) - log(-(b*x - 2*sqrt(c*x^2 + b*x + 1) + 2)/x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sqrt{b x + c x^{2} + 1} - 1}{x \sqrt{b x + c x^{2} + 1}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/x-1/x/(c*x**2+b*x+1)**(1/2),x)

[Out]

Integral((sqrt(b*x + c*x**2 + 1) - 1)/(x*sqrt(b*x + c*x**2 + 1)), x)

________________________________________________________________________________________

Giac [B]  time = 1.14853, size = 68, normalized size = 2.96 \begin{align*} \log \left ({\left | -\sqrt{c} x + \sqrt{c x^{2} + b x + 1} + 1 \right |}\right ) - \log \left ({\left | -\sqrt{c} x + \sqrt{c x^{2} + b x + 1} - 1 \right |}\right ) + \log \left ({\left | x \right |}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/x-1/x/(c*x^2+b*x+1)^(1/2),x, algorithm="giac")

[Out]

log(abs(-sqrt(c)*x + sqrt(c*x^2 + b*x + 1) + 1)) - log(abs(-sqrt(c)*x + sqrt(c*x^2 + b*x + 1) - 1)) + log(abs(
x))